from math import *
from PublicReference.base import *


# 武器钝器
class 职业主动技能(主动技能):

    data0 = []
    data1 = []
    data2 = []
    data3 = []

    def 等效百分比(self, 武器类型):
        等效倍率 = 0.0
        if len(self.data0) >= self.等级 and len(self.data0) > 0:
            等效倍率 += self.data0[self.等级] * self.攻击次数
        if len(self.data1) >= self.等级 and len(self.data1) > 0:
            等效倍率 += self.data1[self.等级] * self.攻击次数2
        if len(self.data2) >= self.等级 and len(self.data2) > 0:
            等效倍率 += self.data2[self.等级] * self.攻击次数3
        if len(self.data3) >= self.等级 and len(self.data3) > 0:
            等效倍率 += self.data3[self.等级] * self.攻击次数4
        return 等效倍率 * (1 + self.TP成长 * self.TP等级) * self.倍率

    #def 等效CD(self, 武器类型):
        #if 武器类型 == '钝器':
            #return round(self.CD / self.恢复 * 1.05, 1)

# 天使光翼
class 技能0(被动技能):
    名称 = '天使光翼'
    所在等级 = 15
    等级上限 = 20
    基础等级 = 10
    冷却关联技能 = ['所有']
    非冷却关联技能 = ['信仰聚合神光惩戒','神圣意志大天使降临','神光耀世']
    def 加成倍率(self, 武器类型):
        if self.等级 <= 10:
            return round(1.00 + 0.01 * self.等级, 5)
        else:
            return round(0.90 + 0.02 * self.等级, 5)

    def 物理攻击力倍率(self, 武器类型):
        if self.等级 <= 10:
            return round(1.00 + 0.01 * self.等级, 5)
        else:
            return round(0.90 + 0.02 * self.等级, 5)

    def CD缩减倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return 0.95

# 天使降临
class 技能1(被动技能):
    名称 = '天使降临'
    所在等级 = 15
    等级上限 = 20
    基础等级 = 10

    def 加成倍率(self, 武器类型):
        if self.等级 <= 10:
            return round(1.08 + 0.01 * self.等级, 5)
        else:
            return round(0.98 + 0.02 * self.等级, 5)

    def 物理攻击力倍率(self, 武器类型):
        if self.等级 <= 10:
            return round(1.08 + 0.01 * self.等级, 5)
        else:
            return round(0.98 + 0.02 * self.等级, 5)

# 一觉被动
class 技能2(被动技能):
    名称 = '荣耀之光'
    所在等级 = 48
    等级上限 = 40
    基础等级 = 20

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.105+0.015 * self.等级, 5)

    def 物理攻击力倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.105 + 0.015 * self.等级, 5)

# 二觉被动
class 技能3(被动技能):
    名称 = '戒律'
    所在等级 = 75
    等级上限 = 40
    基础等级 = 11

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.22 + 0.02 * self.等级, 5)

class 技能4(职业主动技能):
    名称 = '普通攻击'
    备注 = '一轮'
    是否主动 = 0
    关联技能 = ['无']
    所在等级 = 1
    基础等级 = 1
    等级上限 = 20
    CD = 5
    攻击次数 = 1.58+1.76+1.98+2.21
    基础 = 936.3 - 8.9
    成长 = 8.9

    攻击次数2 = 5
    喷涌数据 = 0

    TP成长 = 0.10
    TP上限 = 3

    def 等效百分比(self, 武器类型):
        if self.等级 == 0:
            return 0
        else:  
            return int((self.攻击次数 * (self.基础 + self.成长 * self.等级)* (1 + self.TP成长 * self.TP等级) + self.攻击次数2 * self.喷涌数据)  * self.倍率)

# 神光冲击
class 技能5(职业主动技能):
    名称 = '神光冲击'
    所在等级 = 15
    等级上限 = 60
    基础等级 = 46
    # 基础 = 1596.7
    # 成长 = 180.3
    #攻击力：<data0>%
    data0 = [(i*1.0/1.126*1.1342) for i in [0, 1777, 1957, 2137, 2318, 2498, 2678, 2858, 3039, 3219, 3399, 3580, 3760, 3940, 4121, 4301, 4481, 4661, 4842, 5022, 5202, 5383, 5563, 5743, 5923, 6104, 6284, 6464, 6645, 6825, 7005, 7186, 7366, 7546, 7726, 7907, 8087, 8267, 8448, 8628, 8808, 8988, 9169, 9349, 9529, 9710, 9890, 10070, 10251, 10431, 10611, 10791, 10972, 11152, 11332, 11513, 11693, 11873, 12053, 12234, 12414]]
    CD = 4
    TP成长 = 0.10
    TP上限 = 5

# 神光连斩
class 技能6(职业主动技能):
    名称 = '神光连斩'
    所在等级 = 15
    等级上限 = 60
    基础等级 = 46
    # 基础 = 2109.7
    # 成长 = 238.3
    #第1击攻击力：<data0>%
    data0 = [(i*1.0/1.126*1.1346) for i in [0, 1174, 1293, 1413, 1532, 1651, 1770, 1889, 2008, 2128, 2247, 2366, 2485, 2604, 2723, 2843, 2962, 3081, 3200, 3319, 3439, 3558, 3677, 3796, 3915, 4034, 4154, 4273, 4392, 4511, 4630, 4749, 4869, 4988, 5107, 5226, 5345, 5464, 5584, 5703, 5822, 5941, 6060, 6180, 6299, 6418, 6537, 6656, 6775, 6895, 7014, 7133, 7252, 7371, 7490, 7610, 7729, 7848, 7967, 8086, 8205, 8325, 8444, 8563, 8682, 8801, 8920, 9040, 9159, 9278, 9397]]
    #第2击攻击力：<data1>%
    data1 = [(i*1.0/1.126*1.1346) for i in [0, 1174, 1293, 1413, 1532, 1651, 1770, 1889, 2009, 2128, 2247, 2366, 2485, 2604, 2724, 2843, 2962, 3081, 3200, 3319, 3439, 3558, 3677, 3796, 3915, 4035, 4154, 4273, 4392, 4511, 4630, 4750, 4869, 4988, 5107, 5226, 5345, 5465, 5584, 5703, 5822, 5941, 6061, 6180, 6299, 6418, 6537, 6656, 6776, 6895, 7014, 7133, 7252, 7372, 7491, 7610, 7729, 7848, 7967, 8087, 8206, 8325, 8444, 8563, 8682, 8802, 8921, 9040, 9159, 9278, 9398]]
    攻击次数2 = 1
    CD = 5
    TP成长 = 0.10
    TP上限 = 5

# 圣盾突击
class 技能7(职业主动技能):
    名称 = '圣盾突击'
    所在等级 = 20
    等级上限 = 60
    基础等级 = 43
    # 基础 = 2756.7
    # 成长 = 311.3
    #攻击力：<data0>% X 4
    data0 = [(i*1.0/1.126*1.1334) for i in [0, 767, 844, 922, 1000, 1078, 1156, 1234, 1311, 1389, 1467, 1545, 1623, 1700, 1778, 1856, 1934, 2012, 2090, 2167, 2245, 2323, 2401, 2479, 2556, 2634, 2712, 2790, 2868, 2946, 3023, 3101, 3179, 3257, 3335, 3413, 3490, 3568, 3646, 3724, 3802, 3879, 3957, 4035, 4113, 4191, 4269, 4346, 4424, 4502, 4580, 4658, 4736, 4813, 4891, 4969, 5047, 5125, 5202, 5280, 5358]]
    攻击次数 = 4
    CD = 6
    TP成长 = 0.10
    TP上限 = 5


# 神光喷涌
class 技能8(职业主动技能):
    名称 = '神光喷涌'
    所在等级 = 25
    等级上限 = 60
    基础等级 = 41
    # 基础 = 4451.9
    # 成长 = 503.1
    #锤击攻击力：<data0>%
    data0 = [(i*1.0*0.93239) for i in [0, 991, 1092, 1192, 1293, 1394, 1494, 1595, 1695, 1796, 1897, 1997, 2098, 2199, 2299, 2400, 2500, 2601, 2702, 2802, 2903, 3003, 3104, 3205, 3305, 3406, 3506, 3607, 3708, 3808, 3909, 4009, 4110, 4211, 4311, 4412, 4512, 4613, 4714, 4814, 4915, 5016, 5116, 5217, 5317, 5418, 5519, 5619, 5720, 5820, 5921, 6022, 6122, 6223, 6323, 6424, 6525, 6625, 6726, 6826, 6927]]
    #喷涌的神光攻击力：<data1>% X 4
    data1 = [(i*1.0*0.93239) for i in [0, 991, 1092, 1192, 1293, 1394, 1494, 1595, 1695, 1796, 1897, 1997, 2098, 2199, 2299, 2400, 2500, 2601, 2702, 2802, 2903, 3003, 3104, 3205, 3305, 3406, 3506, 3607, 3708, 3808, 3909, 4009, 4110, 4211, 4311, 4412, 4512, 4613, 4714, 4814, 4915, 5016, 5116, 5217, 5317, 5418, 5519, 5619, 5720, 5820, 5921, 6022, 6122, 6223, 6323, 6424, 6525, 6625, 6726, 6826, 6927]]
    攻击次数2 = 4
    CD = 8
    TP成长 = 0.10
    TP上限 = 5

    def 小型喷涌神光攻击力(self):
        return int(self.data1[self.等级] * (1 + self.TP成长 * self.TP等级)*0.1)

# 神光盾击
class 技能9(职业主动技能):
    名称 = '神光盾击'
    所在等级 = 30
    等级上限 = 60
    基础等级 = 38
    # 基础 = 4908.2
    # 成长 = 554.8
    #第1击攻击力：<data0>% X 3
    data0 = [(i*1.0/1.126*1.13476) for i in [0, 899, 991, 1082, 1173, 1264, 1356, 1447, 1538, 1629, 1721, 1812, 1903, 1995, 2086, 2177, 2268, 2360, 2451, 2542, 2634, 2725, 2816, 2907, 2999, 3090, 3181, 3273, 3364, 3455, 3546, 3638, 3729, 3820, 3911, 4003, 4094, 4185, 4277, 4368, 4459, 4550, 4642, 4733, 4824, 4916, 5007, 5098, 5189, 5281, 5372, 5463, 5554, 5646, 5737, 5828, 5920, 6011, 6102, 6193, 6285]]
    攻击次数 = 3
    #第2击攻击力：<data1>% X 3
    data1 = [(i*1.0/1.126*1.13476) for i in [0, 922, 1016, 1110, 1203, 1297, 1390, 1484, 1578, 1671, 1765, 1859, 1952, 2046, 2139, 2233, 2327, 2420, 2514, 2608, 2701, 2795, 2888, 2982, 3076, 3169, 3263, 3357, 3450, 3544, 3637, 3731, 3825, 3918, 4012, 4106, 4199, 4293, 4386, 4480, 4574, 4667, 4761, 4855, 4948, 5042, 5135, 5229, 5323, 5416, 5510, 5603, 5697, 5791, 5884, 5978, 6072, 6165, 6259, 6352, 6446]]
    攻击次数2 = 3
    CD = 8
    TP成长 = 0.10
    TP上限 = 5

# 烈光
class 技能10(职业主动技能):
    名称 = '烈光'
    所在等级 = 30
    等级上限 = 60
    基础等级 = 38
    # 基础 = 4966.2
    # 成长 = 560.8
    #上挑攻击力：<data0>%
    data0 = [(i*1.0/1.126*1.1345) for i in [0, 2759, 3039, 3319, 3599, 3879, 4159, 4439, 4719, 4999, 5279, 5559, 5839, 6119, 6399, 6679, 6959, 7239, 7519, 7799, 8079, 8359, 8639, 8919, 9199, 9479, 9759, 10039, 10319, 10599, 10879, 11159, 11439, 11719, 11999, 12279, 12559, 12839, 13119, 13399, 13679, 13959, 14239, 14519, 14799, 15079, 15359, 15639, 15919, 16199, 16479, 16759, 17039, 17319, 17599, 17879, 18159, 18439, 18719, 18999, 19279, 19559]]
    #下砸攻击力：<data1>%
    data1 = [(i*1.0/1.126*1.1345) for i in [0, 2768, 3049, 3329, 3610, 3891, 4172, 4453, 4734, 5014, 5295, 5576, 5857, 6138, 6419, 6699, 6980, 7261, 7542, 7823, 8104, 8384, 8665, 8946, 9227, 9508, 9789, 10070, 10350, 10631, 10912, 11193, 11474, 11755, 12035, 12316, 12597, 12878, 13159, 13440, 13720, 14001, 14282, 14563, 14844, 15125, 15405, 15686, 15967, 16248, 16529, 16810, 17090, 17371, 17652, 17933, 18214, 18495, 18775, 19056, 19337, 19618]]
    攻击次数2 = 1
    CD = 8
    TP成长 = 0.10
    TP上限 = 5

# 神光闪耀
class 技能11(职业主动技能):
    名称 = '神光闪耀'
    所在等级 = 35
    等级上限 = 60
    基础等级 = 36
    # 基础 = 7816.3
    # 成长 = 882.7
    #多段攻击力：<data0>% X 10
    data0 = [(i*1.0*1.10673) for i in [0, 609, 671, 732, 795, 856, 918, 980, 1041, 1104, 1165, 1227, 1289, 1350, 1413, 1474, 1536, 1598, 1659, 1722, 1783, 1845, 1907, 1968, 2031, 2092, 2154, 2216, 2277, 2340, 2401, 2463, 2525, 2586, 2649, 2710, 2772, 2834, 2895, 2958, 3019, 3081, 3143, 3204, 3267, 3328, 3390, 3452, 3513, 3576, 3637, 3699, 3761, 3822, 3885, 3946, 4008, 4070, 4131, 4194, 4255]]
    攻击次数 = 10
    #最后一击攻击力：<data1>%
    data1 = [(i*1.0*1.1088) for i in [0, 2609, 2875, 3139, 3404, 3670, 3935, 4199, 4463, 4729, 4993, 5258, 5524, 5788, 6053, 6317, 6583, 6847, 7112, 7378, 7642, 7906, 8171, 8437, 8701, 8966, 9232, 9496, 9760, 10024, 10291, 10555, 10820, 11086, 11350, 11614, 11878, 12144, 12409, 12674, 12940, 13204, 13468, 13732, 13998, 14263, 14528, 14794, 15058, 15322, 15586, 15852, 16117, 16381, 16648, 16912, 17176, 17440, 17706, 17971, 18235]]
    攻击次数2 = 1
    CD = 16
    TP成长 = 0.10
    TP上限 = 5
    是否有护石 = 1
    技能施放时间 = 2

    护石选项 = ['魔界', '圣痕']
    def 装备护石(self, x):
        if x == 0:
            self.倍率 *= 1.24
        elif x == 1:
            self.倍率 *= 1.24 + 0.09

# 神光闪影击
class 技能12(职业主动技能):
    名称 = '神光闪影击'
    所在等级 = 35
    等级上限 = 60
    基础等级 = 36
    # 基础 = 10235.5
    # 成长 = 1155.5
    data0 = [(i*1.0/1.125*1.1335) for i in [0, 526, 579, 632, 686, 739, 792, 846, 899, 952, 1006, 1059, 1113, 1166, 1219, 1273, 1326, 1379, 1433, 1486, 1539, 1593, 1646, 1700, 1753, 1806, 1860, 1913, 1966, 2020, 2073, 2126, 2180, 2233, 2287, 2340, 2393, 2447, 2500, 2553, 2607, 2660, 2713, 2767, 2820, 2874, 2927, 2980, 3034, 3087, 3140, 3194, 3247, 3301, 3354, 3407, 3461, 3514, 3567, 3621, 3674]]
    攻击次数 = 15
    data1 = [(i*1.0/1.125*1.1330) for i in [0, 3501, 3856, 4211, 4566, 4921, 5277, 5632, 5987, 6342, 6697, 7053, 7408, 7763, 8118, 8473, 8829, 9184, 9539, 9894, 10249, 10604, 10960, 11315, 11670, 12025, 12380, 12736, 13091, 13446, 13801, 14156, 14512, 14867, 15222, 15577, 15932, 16287, 16643, 16998, 17353, 17708, 18063, 18419, 18774, 19129, 19484, 19839, 20195, 20550, 20905, 21260, 21615, 21971, 22326, 22681, 23036, 23391, 23746, 24102, 24457]]
    攻击次数2 = 1
    CD = 20
    TP成长 = 0.10
    TP上限 = 5


# 神罚之锤
class 技能13(职业主动技能):
    名称 = '神罚之锤'
    所在等级 = 40
    等级上限 = 60
    基础等级 = 33
    # 基础 = 11383.6
    # 成长 = 1285.4
    data0 = [(i*1.0/1.126*1.1342) for i in [0, 12669, 13955, 15240, 16526, 17811, 19096, 20382, 21667, 22952, 24238, 25523, 26808, 28094, 29379, 30664, 31950, 33235, 34521, 35806, 37091, 38377, 39662, 40947, 42233, 43518, 44803, 46089, 47374, 48659, 49945, 51230, 52516, 53801, 55086, 56372, 57657, 58942, 60228, 61513, 62798, 64084, 65369, 66654, 67940, 69225, 70511, 71796, 73081, 74367, 75652, 76937, 78223, 79508, 80793, 82079, 83364, 84650, 85935, 87220, 88506]]
    CD = 25
    TP成长 = 0.10
    TP上限 = 5
    是否有护石 = 1

    护石选项 = ['魔界', '圣痕']
    def 装备护石(self, x):
        if x == 0:
            self.倍率 *= 1.27
        elif x == 1:
            self.倍率 *= 1.27 + 0.09


# 神光之跃
class 技能14(职业主动技能):
    名称 = '神光之跃'
    所在等级 = 45
    等级上限 = 60
    基础等级 = 31
    # 基础 = 19198.4
    # 成长 = 2167.6
    data0 = [(i*1.0/1.126*1.1341) for i in [0, 21366, 23533, 25701, 27868, 30036, 32204, 34371, 36539, 38706, 40874, 43042, 45209, 47377, 49544, 51712, 53879, 56047, 58215, 60382, 62550, 64717, 66885, 69053, 71220, 73388, 75555, 77723, 79891, 82058, 84226, 86393, 88561, 90728, 92896, 95064, 97231, 99399, 101566, 103734, 105902, 108069, 110237, 112404, 114572, 116739, 118907, 121075, 123242, 125410, 127577, 129745, 131913, 134080, 136248, 138415, 140583, 142750, 144918, 147086, 149253]]
    CD = 45
    TP成长 = 0.10
    TP上限 = 5
    是否有护石 = 1

    护石选项 = ['魔界', '圣痕']
    def 装备护石(self, x):
        if x == 0:
            self.倍率 *= 1.24
        elif x == 1:
            self.倍率 *= 1.24 + 0.08


# 一觉
class 技能15(职业主动技能):
    名称 = '信仰聚合神光惩戒'
    所在等级 = 50
    等级上限 = 40
    基础等级 = 12
    # 基础 = 46241.6
    # 成长 = 13959.2
    data0 = [(i*1.0/1.126*1.1342) for i in [0, 60199, 74158, 88118, 102077, 116036, 129996, 143955, 157914, 171874, 185833, 199792, 213752, 227711, 241670, 255630, 269589, 283548, 297508, 311467, 325426, 339386, 353345, 367304, 381264, 395223, 409182, 423142, 437101, 451060, 465020, 478979, 492938, 506898, 520857, 534817, 548776, 562735, 576695, 590654, 604613]]
    CD = 145.0


# 圣盾裁决
class 技能16(职业主动技能):
    名称 = '圣盾裁决'
    所在等级 = 60
    等级上限 = 40
    基础等级 = 23
    # 基础 = 14912.3
    # 成长 = 1683.7
    data0 = [(i*1.0/1.126*1.1342) for i in [0, 16596, 18280, 19964, 21647, 23331, 25015, 26698, 28382, 30066, 31750, 33433, 35117, 36801, 38484, 40168, 41852, 43536, 45219, 46903, 48587, 50270, 51954, 53638, 55322, 57005, 58689, 60373, 62056, 63740, 65424, 67108, 68791, 70475, 72159, 73842, 75526, 77210, 78894, 80577, 82261]]
    CD = 25
    TP成长 = 0.10
    TP上限 = 5
    是否有护石 = 1

    护石选项 = ['魔界', '圣痕']
    def 装备护石(self, x):
        if x == 0:
            self.倍率 *= 1.24
            self.CD *= 0.90
        elif x == 1:
            self.倍率 *= 1.24 + 0.08

# 破晓之光
class 技能17(职业主动技能):
    名称 = '破晓之光'
    所在等级 = 70
    等级上限 = 40
    基础等级 = 18
    # 基础 = 29092.3
    # 成长 = 3284.7
    data0 = [(i*1.0/1.126*1.1342) for i in [0, 32377, 35662, 38947, 42231, 45516, 48801, 52086, 55370, 58655, 61940, 65224, 68509, 71794, 75078, 78363, 81648, 84933, 88217, 91502, 94787, 98071, 101356, 104641, 107925, 111210, 114495, 117780, 121064, 124349, 127634, 130918, 134203, 137488, 140772, 144057, 147342, 150627, 153911, 157196, 160481]]
    CD = 50
    TP成长 = 0.10
    TP上限 = 5
    是否有护石 = 1

    def 装备护石(self):
        self.倍率 *= 1.11
        self.CD *= 0.90

# 神光回旋斩 择优
class 技能18(职业主动技能):
    名称 = '神光回旋斩'
    所在等级 = 75
    等级上限 = 40
    基础等级 = 16
    # 基础 = 46139.6
    # 成长 = 5209.4
    data0 = [(i*1.0*0.96765) for i in [0, 51349, 56559, 61768, 66978, 72187, 77396, 82606, 87815, 93025, 98234, 103443, 108653, 113862, 119072, 124281, 129490, 134700, 139909, 145119, 150328, 155537, 160747, 165956, 171166, 176375, 181584, 186794, 192003, 197213, 202422, 207632, 212841, 218050, 223260, 228469, 233679, 238888, 244097, 249307, 254516]]
    CD = 40
    是否有护石 = 1

    护石选项 = ['圣痕']
    def 装备护石(self, x):
        if x == 0:
           self.倍率 *= 1.368

# 神圣信约
class 技能19(职业主动技能):
    名称 = '神圣信约'
    所在等级 = 80
    等级上限 = 40
    基础等级 = 13
    # 基础 = 50250.4
    # 成长 = 5673.6
    data0 = [(i*1.0/1.126*1.13197) for i in [0, 5084, 5600, 6116, 6631, 7147, 7663, 8179, 8695, 9210, 9726, 10242, 10758, 11274, 11790, 12305, 12821, 13337, 13853, 14369, 14884, 15400, 15916, 16432, 16948, 17463, 17979, 18495, 19011, 19527, 20043, 20558, 21074, 21590, 22106, 22622, 23137, 23653, 24169, 24685, 25201]]
    攻击次数 = 11
    CD = 45
    是否有护石 = 1
    蓄力 = 0

    护石选项 = ['圣痕']
    def 装备护石(self, x):
        print(self.蓄力)
        if x == 0 and self.蓄力 ==0:
            self.攻击次数 = 0
            self.攻击次数2 = 1
            self.data1 = [(i*11*1.32) for i in self.data0]
        if x == 0 and self.蓄力 ==1:
            self.攻击次数 = 0
            self.攻击次数2 = 1
            self.data1 = [(i*(11+0.23)*1.32) for i in self.data0]

# 二觉
class 技能20(职业主动技能):
    名称 = '神圣意志大天使降临'
    所在等级 = 85
    等级上限 = 40
    基础等级 = 5
    # 基础 = 106483
    # 成长 = 32147
    data0 = [(i*1.0/1.126*1.1342) for i in [0, 138632, 170779, 202925, 235072, 267218, 299365, 331512, 363658, 395805, 427952, 460098, 492245, 524391, 556538, 588685, 620831, 652978, 685125, 717271, 749418, 781565, 813711, 845858, 878004, 910151, 942298, 974444, 1006591, 1038738, 1070884, 1103031, 1135178, 1167324, 1199471, 1231617, 1263764, 1295911, 1328057, 1360204, 1392351]]
    CD = 180

class 技能21(被动技能):
    名称 = '超越之翼'
    所在等级 = 95
    等级上限 = 40
    等级精通 = 30
    基础等级 = 4

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.18 + 0.02 * self.等级, 5)


class 技能22(职业主动技能):
    名称 = '神光耀世'
    所在等级 = 95
    等级上限 = 40
    基础等级 = 6
    基础 = 8603.6
    成长 = 971.4
    攻击次数 = 4
    基础2 = 11471.8
    成长2 = 1295.2
    攻击次数2 = 1
    基础3 = 11471.8
    成长3 = 1295.2
    攻击次数3 = 6
    CD = 60

    def 等效百分比(self, 武器类型):
        if self.等级 == 0:
            return 0
        else:
            return int((self.攻击次数 * (self.基础 + self.成长 * self.等级) + self.攻击次数2 * (self.基础2 + self.成长2 * self.等级) + self.攻击次数3 * (
                        self.基础3 + self.成长3 * self.等级)) * (1 + self.TP成长 * self.TP等级) * self.倍率)

class 技能23(职业主动技能):
    名称 = '启示录：末日救赎'
    所在等级 = 100
    等级上限 = 40
    等级精通 = 30
    基础等级 = 2
    关联技能 = ['无']
    CD = 290.0
    基础 = 27996.7170531396 + 111990.468212558#第一段+第三段
    成长 = 8452.28294686039 + 33808.5317874416#第一段+第三段
    攻击次数 = 1
    基础2 = 7999.11209912093
    成长2 = 2414.88790087907
    攻击次数2 = 7
    基础3 = 11998.843442465
    成长3 = 3622.15655753495
    攻击次数3 = 7

    def 加成倍率(self, 武器类型):
        return 0.0
    
    def 等效百分比(self, 武器类型):
        if self.等级 == 0:
            return 0
        else:
            return int((self.攻击次数 * (self.基础 + self.成长 * self.等级) + self.攻击次数2 * (self.基础2 + self.成长2 * self.等级) + self.攻击次数3 * (
                        self.基础3 + self.成长3 * self.等级)) * (1 + self.TP成长 * self.TP等级) * self.倍率)


技能列表 = []
i = 0
while i >= 0:
    try:
        exec('技能列表.append(技能' + str(i) + '())')
        i += 1
    except:
        i = -1

技能序号 = dict()
for i in range(len(技能列表)):
    技能序号[技能列表[i].名称] = i

一觉序号 = 0
二觉序号 = 0
三觉序号 = 0
for i in 技能列表:
    if i.所在等级 == 50:
        一觉序号 = 技能序号[i.名称]
    if i.所在等级 == 85:
        二觉序号 = 技能序号[i.名称]
    if i.所在等级 == 100:
        三觉序号 = 技能序号[i.名称]

护石选项 = ['无']
for i in 技能列表:
    if i.是否有伤害 == 1 and i.是否有护石 == 1:
        护石选项.append(i.名称)

符文选项 = ['无']
for i in 技能列表:
    if i.所在等级 >= 20 and i.所在等级 <= 80 and i.所在等级 != 50 and i.是否有伤害 == 1:
        符文选项.append(i.名称)


class 职业属性(角色属性):
    实际名称 = '皓曦·帕拉丁'
    角色 = '守护者'
    职业 = '帕拉丁'

    武器选项 = ['钝器']

    类型选择 = ['物理百分比']

    类型 = '物理百分比'
    防具类型 = '板甲'
    防具精通属性 = ['力量']

    主BUFF = 1.89

    蓄力神圣信约 = 0

    def __init__(self):
        基础属性输入(self)
        self.技能栏 = deepcopy(技能列表)
        self.技能序号 = deepcopy(技能序号)

    def 被动倍率计算(self):
        super().被动倍率计算()

        self.技能栏[self.技能序号['普通攻击']].喷涌数据 = self.技能栏[self.技能序号['神光喷涌']].小型喷涌神光攻击力()

        if self.蓄力神圣信约 == 1:
            # print(self.蓄力神圣信约)
            self.技能栏[self.技能序号['神圣信约']].蓄力 = 1
            self.技能栏[self.技能序号['神圣信约']].装备护石(0)

class 皓曦·帕拉丁(角色窗口):
    def 窗口属性输入(self):
        self.初始属性 = 职业属性()
        self.角色属性A = 职业属性()
        self.角色属性B = 职业属性()
        self.一觉序号 = 一觉序号
        self.二觉序号 = 二觉序号
        self.三觉序号 = 三觉序号
        self.护石选项 = deepcopy(护石选项)
        self.符文选项 = deepcopy(符文选项)

    def 护石判断(self):
        sign = 0
        sign2 = 0
        for x in range(3):
            if self.护石栏[x].currentText() == '神圣信约':
                sign = 1
        if sign == 1:
            # self.蓄力神圣信约.setChecked(False)
            self.蓄力神圣信约.setEnabled(True)
            self.蓄力神圣信约.setStyleSheet(复选框样式)
        else:
            self.蓄力神圣信约.setChecked(False)
            self.蓄力神圣信约.setEnabled(False)
            self.蓄力神圣信约.setStyleSheet(复选框样式)
    
    def 界面(self):
        super().界面()
        for i in range(3):
            self.护石栏[i].currentIndexChanged.connect(lambda state: self.护石判断())

        self.蓄力神圣信约 = QCheckBox("蓄力-神圣信约", self.main_frame2)
        self.蓄力神圣信约.setStyleSheet(复选框样式)
        self.蓄力神圣信约.setChecked(False)
        self.蓄力神圣信约.resize(120, 20)
        self.蓄力神圣信约.move(325, 380)

    def 输入属性(self, 属性, x = 0):
        super().输入属性(属性, x)
        if self.蓄力神圣信约.isChecked():
            属性.蓄力神圣信约 = 1
    
    def 载入配置(self, path = 'set'):
        super().载入配置(path)
        try:
            setfile = open('./ResourceFiles/'+self.角色属性A.实际名称 + '/' + path + '/skill5.ini', 'r', encoding='utf-8').readlines()
            num = 0
            for i in [ self.蓄力神圣信约 ]:
                if setfile[num].replace('\n', '') == 'True':
                    i.setChecked(True)
                else:
                    i.setChecked(False)
                num += 1
        except:
            pass

    def 保存配置(self, path = 'set'):
        super().保存配置(path)
        try:
            setfile = open('./ResourceFiles/'+self.角色属性A.实际名称 + '/' + path + '/skill5.ini', 'w', encoding='utf-8')
            setfile.write(str(self.蓄力神圣信约.isChecked()) + '\n')
        except:
            pass
